#pragma once

class CCalculationPage;
// CCalculationSheet




class CCalculationSheet : public CTabCtrl
{
    private:
        struct struct_page
        {
            CString name;
            UINT id;
            CCalculationPage* page;
            bool managed;
        };

        DECLARE_DYNAMIC(CCalculationSheet)

    public:
        CCalculationSheet();
        virtual ~CCalculationSheet();

        // use it for a general stuff - use the special stuff to safe time
        void OnPointsChanged();

        void OnRaceChanged();
        void OnLevelChanged();
        void OnClassChanged();
        void OnRRChanged();

        void AddPage(CCalculationPage*, UINT id, UINT name_id);
        void AddPage(CRuntimeClass*, UINT id, UINT name_id);

        void ActivatePage(UINT nr);

        CWnd* GetPage(UINT nr);

        void OnTabResize();

        afx_msg void OnTcnSelchange(NMHDR *pNMHDR, LRESULT *pResult);


    protected:
        DECLARE_MESSAGE_MAP()

        CCalculationPage* mwnd_currentpage;

        CArray<struct_page> ma_pages;
        CArray<UINT>  man_tab_ids;
    public:
        afx_msg void OnSize(UINT nType, int cx, int cy);
        afx_msg void OnDestroy();
};


